package com.bytedance.frameworks.baselib.network.http.c;

import com.bytedance.frameworks.baselib.network.http.BaseRequestContext;
import com.bytedance.frameworks.baselib.network.http.AppConfig;
import com.bytedance.retrofit2.client.Request;
import com.bytedance.retrofit2.RequestBuilder;
import com.bytedance.retrofit2.RequestInterceptor;
import com.bytedance.retrofit2.ResponseInterceptor;
import com.bytedance.retrofit2.ResponseWrapper;

public class aa implements RequestInterceptor, ResponseInterceptor {
    public aa() {

    }

    public void intercept(Request request, ResponseWrapper responseWrapper) throws Throwable {

    }

    public void intercept(RequestBuilder requestBuilder) {
        if (requestBuilder != null) {
            String v1 = requestBuilder.url;
            String v0 = (requestBuilder.o instanceof BaseRequestContext)
                    ? AppConfig.a(v1, (BaseRequestContext) requestBuilder.o)
                    : AppConfig.c(v1);
            requestBuilder.url = v0;
            if (!requestBuilder.n) {
                return;
            }

            try {
                requestBuilder.url = AppConfig.d(requestBuilder.url);
            } catch (Throwable v0_1) {
                v0_1.printStackTrace();
            }
        }
    }
}

